<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  const p = new Promise((resolve, reject)=>{
    console.log('开始请求A数据.....')
    try {
      // throw new Error('您的网络异常请重试！！！')
      setTimeout(()=>{
        console.log('A数据请求成功')
        resolve('okk')
        console.log(p)
      },5000)
    }catch (e){
      setTimeout(()=>{
        console.log(e.message)
        reject(e.message)
        console.log('任务执行结束')
        console.log(p)
      },2000)
    }
  })
  .then((value)=>{
    return new Promise((resolve, reject)=>{
      console.log('开始请求数据B.....')
      try {
        throw new Error('您的网络异常请重试！！！')
        setTimeout(()=>{
          console.log('B数据请求成功')
          resolve('okk')
        },2000)
      }catch (e){
        setTimeout(()=>{
          console.log(e.message)
          reject(e.message)
          console.log('任务执行结束')
        },2000)
      }

    })
  },(reason)=>{
    console.log('错误')
  })
  .then((value)=>{
    return new Promise((resolve, reject)=>{

      console.log('开始请求C数据.....')
      try {
        // throw new Error('您的网络异常请重试！！！')
        setTimeout(()=>{
          console.log('C数据请求成功')
          resolve('okk')
        },2000)
      }catch (e){
        setTimeout(()=>{
          console.log(e.message)
          reject(e.message)
          console.log('任务执行结束')
        },2000)
      }

    })
  },
    (reason)=>{
    console.log('失败查询')
    return new Promise((resolve, reject)=>{
      console.log('开始查询文件E的数据......')
      setTimeout(()=>{
        try {
          console.log('E的数据查询完毕~~~')
        }catch (e){
          console.log(e)
        }
      },2000)
    })
  })
</script>
</body>
</html>